package com.jxd.ordering.controller;

import com.jxd.ordering.model.Page;
import com.jxd.ordering.service.IPermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;
import java.util.Map;

/**
 * @ClassName PermissionController
 * @Description TODO
 * @Author Ankailong
 * @Date 2022/9/27
 * @Version 1.0
 */
@RestController
public class PermissionController {
    @Autowired
    private IPermissionService permissionService;

    /**
     * 获取某个等级的权限信息
     * level: 1
     * @param level 权限等级
     * @return 某权限等级可以访问的页面列表
     */
    @RequestMapping("/getPermissionByLevel")
    public List<Page> getPermissionByLevel(int level) {
        return permissionService.getPermissionByLevel(level);
    }
}
